package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 异常订单表
 * @TableName t_exception_order
 */
@Data
public class ExceptionOrder implements Serializable {
    /**
     * 异常订单id
     */
    private Integer eoId;

    /**
     * 订单流水号
     */
    private String oiNo;

    /**
     * 0；待处理 1:已处理,2 不通过
     */
    private Integer eoStatus;

    /**
     * 处理时间
     */
    private Date eoHandleTime;

    /**
     * 预留varchar字段
     */
    private String reservedVar;

    /**
     * 预留int字段
     */
    private Integer reservedInt;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExceptionOrder other = (ExceptionOrder) that;
        return (this.getEoId() == null ? other.getEoId() == null : this.getEoId().equals(other.getEoId()))
            && (this.getOiNo() == null ? other.getOiNo() == null : this.getOiNo().equals(other.getOiNo()))
            && (this.getEoStatus() == null ? other.getEoStatus() == null : this.getEoStatus().equals(other.getEoStatus()))
            && (this.getEoHandleTime() == null ? other.getEoHandleTime() == null : this.getEoHandleTime().equals(other.getEoHandleTime()))
            && (this.getReservedVar() == null ? other.getReservedVar() == null : this.getReservedVar().equals(other.getReservedVar()))
            && (this.getReservedInt() == null ? other.getReservedInt() == null : this.getReservedInt().equals(other.getReservedInt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEoId() == null) ? 0 : getEoId().hashCode());
        result = prime * result + ((getOiNo() == null) ? 0 : getOiNo().hashCode());
        result = prime * result + ((getEoStatus() == null) ? 0 : getEoStatus().hashCode());
        result = prime * result + ((getEoHandleTime() == null) ? 0 : getEoHandleTime().hashCode());
        result = prime * result + ((getReservedVar() == null) ? 0 : getReservedVar().hashCode());
        result = prime * result + ((getReservedInt() == null) ? 0 : getReservedInt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", eoId=").append(eoId);
        sb.append(", oiNo=").append(oiNo);
        sb.append(", eoStatus=").append(eoStatus);
        sb.append(", eoHandleTime=").append(eoHandleTime);
        sb.append(", reservedVar=").append(reservedVar);
        sb.append(", reservedInt=").append(reservedInt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}